<template>
  <!-- 订单提交成功 -->
  <div class="success column-center">
    <p style="color:#FF9900;">
      订单提交成功！
      <br />请向销售人员支付订单！
    </p>
    <p
      style="color: rgba(16, 16, 16, 0.65);font-size: 12px;text-align: left;margin:50px;"
    >{{time}}s后自动跳转到个人中心</p>
  </div>
</template>

<script>
import { mapGetters } from "vuex";
export default {
  data() {
    return {
      time: 5
    };
  },
  created() {
    let time = setInterval(() => {
      this.time = this.time - 1;
      if (this.time == 0) {
        clearInterval(time);
        //跳转
        this.$router.replace({
          name: "OrderDetail"
        });
      }
    }, 1000);
  },
  computed: {
    ...mapGetters({ orderNo: "getSubmitOrderId" })
  }
};
</script>

<style lang="scss" scoped>
.success {
  position: absolute;
  height: 100%;
  width: 100%;
}
p {
  margin: 0;
}
</style>